import VueRouter from 'vue-router'


import home from './components/tabbar/home.vue'
import member from './components/tabbar/member.vue'
import shopcar from './components/tabbar/shopcar.vue'
import search from './components/tabbar/search.vue'
import newslist from './components/news/NewsList.vue'
// 测试如何使用mint-ui
import imgshares from './components/img-share/img_share.vue'


// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    { path:'/',redirect:'home' }, //这里重定向直接就是组件
    { path:'/home',component:home },
    { path:'/member',component:member },
    { path:'/shopcar',component:shopcar },
    { path:'/search',component:search },
    { path:'/home/newslist',component:newslist},
    // 测试mint-ui
    { path:'/home/mint-ui-test',component:imgshares}
  ],
  linkActiveClass:'mui-active'

})

// 把路由对象暴露出去
export default router